<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{% endblock %} - Trading Analyzer</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap5.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/colreorder/1.5.4/css/colReorder.bootstrap5.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.2/css/buttons.bootstrap5.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.4/css/select.bootstrap5.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        body {
            background-color: #f8f9fa;
        }
        .side-navbar {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 20px;
            margin-top: 0;
            margin-left: 0;
        }
        .side-navbar .navbar-brand {
            font-weight: bold;
            color: #222;
            margin-right: 16px;
            text-decoration: none;
        }
        .side-navbar .nav-link {
            color: #444;
            text-decoration: none;
            margin-right: 12px;
            font-weight: 500;
        }
        .side-navbar .nav-link:hover, .side-navbar .navbar-brand:hover {
            color: #007bff;
        }
        .content {
            padding: 20px;
        }
        .table-sm td, .table-sm th {
            padding: 0.3rem;
            vertical-align: middle;
        }
        .table-responsive {
            margin: 0;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,.05);
        }
        .dataTables_wrapper {
            padding: 1rem;
        }
        .container-fluid {
            max-width: 100%;
        }
        .card {
            box-shadow: 0 2px 4px rgba(0,0,0,.05);
            border: none;
        }
        .btn-group {
            box-shadow: 0 2px 4px rgba(0,0,0,.05);
        }
        .btn {
            border-radius: 4px;
        }
        .custom-control-label {
            cursor: pointer;
        }
        .dataTables_filter input {
            border-radius: 4px;
            border: 1px solid #ced4da;
            padding: 0.375rem 0.75rem;
        }
        .dataTables_length select {
            border-radius: 4px;
            border: 1px solid #ced4da;
            padding: 0.375rem 0.75rem;
        }
        .paginate_button {
            border-radius: 4px !important;
        }
        .alert {
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,.05);
        }
        /* 列拖拽相关样式 */
        .dt-colReorder-moving {
            background: #f8f9fa;
            border: 1px dashed #007bff;
        }
        .dt-colReorder-float {
            background: white !important;
            box-shadow: 0 2px 4px rgba(0,0,0,.1);
        }
        /* 可编辑单元格样式 */
        .editable {
            cursor: pointer;
            position: relative;
        }
        .editable:hover {
            background-color: #f8f9fa;
        }
        .editable:after {
            content: '\f044';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            color: #6c757d;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .editable:hover:after {
            opacity: 1;
        }
        /* 编辑输入框样式 */
        .edit-input {
            width: 100%;
            padding: 0.2rem;
            border: 1px solid #007bff;
            border-radius: 4px;
            background: white;
        }
        .edit-input:focus {
            outline: none;
            box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
        }
    </style>
    {% block styles %}{% endblock %}
</head>
<body>
    <div class="container-fluid content">

        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
                        {{ message }}
                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}

        {% block content %}{% endblock %}
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
    <script src="https://cdn.datatables.net/colreorder/1.5.4/js/dataTables.colReorder.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.2.2/js/dataTables.buttons.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.bootstrap5.min.js"></script>
    <script src="https://cdn.datatables.net/select/1.3.4/js/dataTables.select.min.js"></script>
    {% block scripts %}{% endblock %}
</body>
</html> 